import * as THREE from "three";
import { FirstPersonControls } from "three/examples/jsm/controls/FirstPersonControls.js";

const createControl = (context) => {
  let { camera, renderer } = context;
  const controls = new FirstPersonControls(camera, renderer.domElement);//创建控件对象

  controls.movementSpeed = 150;
  controls.lookSpeed = 0.1;
  controls.verticalMax = 2.0;
  controls.verticalMin = 1.0;
  return { controls };
}

export default createControl;
